package com.foodmarket.pojo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Email;
import java.time.LocalDate;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Buyers{
    private int buyerId;//主键id
    private String username;//账号，数字加字母组合
    @JsonIgnore
    private String password; // 密码通常是加密存储
    private String phone;
    @Email
    private String email;
    private String address;//地址
    private String name;//用户名

    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    private LocalDate registrationDate;//注册时间
}
